<!DOCTYPE html>
<html>
<head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css">
    <script type="text/javascript" src="/static/layui/layui.js"></script>
</head>
<body style="padding:10px;">
<form class="layui-form">
    <input type="hidden" name="id" value="{$shop.id}">
    <div class="layui-form-item">
        <label class="layui-form-label">OKR-O</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" name="okrO" value="{$shop.okrO}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">KR1</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" name="kr1" value="{$shop.kr1}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">KR2</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" name="kr2" value="{$shop.kr2}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">KR3</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" name="kr3" value="{$shop.kr3}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">类型</label>
        <div class="layui-input-inline">
            <select name="cat">
                <option value=0  {if $shop['cat']==0} selected {/if}></option>
                {volist name="cat" id="cat_v"}
                <option value="{$cat_v['id']}"  {if $shop['cat']==$cat_v['id']} selected {/if}>{$cat_v['name']}</option>
                {/volist}
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">负责人</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" name="people" value="{$shop.people}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">重要性</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" name="iidx" value="{$shop.iidx}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>
        <div class="layui-input-inline">
            <select name="status">
                <option value="1" {if $shop['status']==1} selected {/if}>进行中</option>
                <option value="2" {if $shop['status']==2} selected {/if}>已完成</option>
                <option value="3" {if $shop['status']==3} selected {/if}>已逾期</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">进度%</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" name="pro" value="{$shop.pro}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">添加时间</label>
        <div class="layui-input-inline">
            <input type="date" class="layui-input" name="startime" value="{$shop.startime}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">截止时间</label>
        <div class="layui-input-inline">
            <input type="date" class="layui-input" name="ddl" value="{$shop.ddl}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">上级目标</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" name="superior" value="{$shop.superior}">
        </div>
    </div>

</form>
<div class="layui-form-item">
    <div class="layui-input-block">
        <button class="layui-btn" onclick="save()">修 改</button>
    </div>
</div>
<script type="text/javascript">
    layui.use(['layer','form'],function(){
        form = layui.form;
        layer = layui.layer;
        $ = layui.jquery;
    });
    function save(){
        $.post('/index.php/Index/doedit',$('form').serialize(),function(res){
            if(res.code>0){
                layer.alert(res.msg,{icon:2});
            }else{
                layer.msg(res.msg);
                setTimeout(function(){parent.window.location.reload();},1000);
            }
        },'json');
    }
</script>
</body>
</html>
